package com.crane.oss.listener;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.crane.oss.school.bean.request.classesinfo.BatchImportClassesEntity;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class UploadClassesExcelListener extends AnalysisEventListener<BatchImportClassesEntity> {
	
	public static final List<BatchImportClassesEntity> list = new ArrayList<>();

	@Override
	public void invoke(BatchImportClassesEntity data, AnalysisContext context) {
		log.info("BatchImportClasses className={},termBeginTime={},type={}", data.getClassName(),data.getTermBeginTime(),data.getType());
		list.add(data);
	}

	@Override
	public void doAfterAllAnalysed(AnalysisContext context) {
		// TODO Auto-generated method stub
		
	}

}
